package org.dru.clay.util.file;

import org.dru.clay.util.functional.Reducer;

import java.io.File;

/**
 * FileReducers
 * User: joakimd
 * Date: 2013-07-24
 * Time: 15:34
 */
public final class FileReducers {
    private FileReducers() {
    }

    public static Reducer<String, File> file() {
        return StringFile.PATH;
    }

    private static enum StringFile implements Reducer<String, File> {
        PATH {
            @Override
            public File apply(final File result, final String value) {
                return new File(result, value);
            }
        }
    }
}
